﻿using FigureDraw.Diagram;
using FigureDraw.Graphic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FigureDraw.Shapes
{
    public class MyLine : MyShape
    {
        public MyLine() : base()
        {
        }

        public MyLine(MyPoint startPoint, MyPoint endPoint)
            : base(startPoint, endPoint)
        {
            
        }

        public override void Draw(CommonGraphic graphic)
        {
            graphic.DrawLine(startPoint, endPoint, strokeColor, strokeWidth);
        }

        public override MyShape Clone(BlockDiagram diagram)
        {
            return this;
        }

        public override MyShape Clone()
        {
            MyShape shape = new MyLine(startPoint, endPoint);
            shape.StrokeColor = strokeColor;
            shape.StrokeWidth = strokeWidth;
            shape.BrushColor = brushColor;

            return shape;
        }
    }
}
